
const Mock = require('mockjs')
const getStatList = require('./data/getStatList.js')
const Random = Mock.Random

module.exports = [
    // 答卷列表
    {
        url: "/api/stat/:questionId",
        method: 'get',
        response() {
            return {
                errno: 0,
                data: {
                    total: 100,
                    list: getStatList()
                }
            }
        }
    },
    // 获取统计图数据
    {
        url: "/api/stat1/:questionId/:componentId",
        method: 'get',
        response() {
            return {
                errno: 0,
                data: {
                    stat: [
                        { name: "选项 1", count: 20 },
                        { name: "选项 2", count: 30 },
                        { name: "选项 3", count: 40 },
                    ]
                }
            }
        }
    }
]